package com.ryskoo.basicdata.area.province.repository;

import com.ryskoo.basicdata.area.province.domain.ProvincePO;
import com.ryskoo.framework.core.repository.BasicJPAImpl;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;

/**
 * @author qyc
 */
@Repository
public class ProvinceJPAImpl extends BasicJPAImpl<ProvincePO> implements IProvinceRepository {

	@Override
	public void initArea() {
		
	}

	@Override
	public ProvincePO getByEntityNo(String entityNo) {
		String hql = "select o from ProvincePO o where o.entityNo = :entityNo ";
		Query query = getH4Session().createQuery(hql);
		query.setString("entityNo",entityNo);
		return (ProvincePO) query.uniqueResult();
	}
}
